-- GENERATED SPELL FOR [Corok the Mighty] --


function spell0_22011(pUnit, Event) --@Stomp,n/a--
pUnit:FullCastSpellOnTarget(12612,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22011', 592, 1)
end

function spell1_22011(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(15550,pUnit)
pUnit:RegisterEvent('Sorts_22011', 583, 1)
end

function Sorts_22011(pUnit, Event)
local choix_sorts_22011 = math.random(0, 1)
if choix_sorts_22011 == 0 then
pUnit:RegisterEvent('spell0_22011', 1, 1)
end
if choix_sorts_22011 == 1 then
pUnit:RegisterEvent('spell1_22011', 1, 1)
end
end

function mob22011_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22011', math.random(1500, 3000), 1)
end

function mob22011_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22011_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22011_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22011, 1, 'mob22011_Action')
RegisterUnitEvent(22011, 2, 'mob22011_Leave')
RegisterUnitEvent(22011, 3, 'mob22011_Kill')
RegisterUnitEvent(22011, 4, 'mob22011_Die')
